package com.myspring.service.impl;

import com.myspring.dao.AccountDao;
import com.myspring.po.Account;
import com.myspring.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * ClassName: AccountServiceImpl
 * Package: com.myspring.service.impl
 * Description:
 *
 * @Author 刘英杰
 * @Create 2025/2/7 10:41
 * @Version 1.0
 */

@Service
public class AccountServiceImpl implements AccountService {
    @Autowired
    AccountDao accountDao;

    @Override
    public void transferAccount(Account to, Account from) {
        accountDao.update(from);
//        int a = 1/0;
        accountDao.update(to);
    }
}
